cmake_minimum_required(VERSION 2.8)
get_filename_component(_DIR_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
set(_TARGET "fx${_DIR_NAME}")
set(_TARGET_INCLUDE_DIR ${FUXI_INCLUDEDIR}/${_DIR_NAME})

file(GLOB _HEADERS ${_TARGET_INCLUDE_DIR}/*.h)
file(GLOB _SOURCES *.cpp)

list(APPEND HEADERS ${_HEADERS})
list(APPEND SOURCES ${_SOURCES})

SET(TARGET_SRC ${HEADERS} ${SOURCES})

add_library(${_TARGET} SHARED ${TARGET_SRC})
install(TARGETS ${_TARGET} LIBRARY DESTINATION lib)

# Target libraries
target_link_libraries(${_TARGET} ${FUXI_THIRD_LIBRARIES})
if(USE_COTIRE)
set_target_properties(${_TARGET} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT ${_TARGET_INCLUDE_DIR}/FXStdafx.h)
cotire(${_TARGET})
endif()






